<html>
    <body>
        省份:<select id="province">
            <option value="0">请选择</option>
            <option value="1">广西</option>
            <option value="2">广东</option>
        </select>
        城市:<select id="city">
            <option>请选择</option>
        </select>
    </body>
    <script>
        window.onload = function(){
            var s=document.getElementById("province");
            var c=document.getElementById("city");

            s.onchange = function(){
                //广西
                if(s.value == 1){
                    c.innerHTML = '<option>南宁</option><option>北海</option>';
                }
                //广东
                if(s.value == 2){
                    c.innerHTML = '<option>广州</option><option>深圳</option>';
                }
                //请选择
                if(s.value == 0){
                    c.innerHTML = ' <option>请选择</option>'
                }
                
            }
        }

    </script>
</html>